package net.kts.util.url.mylocation;

import java.util.ArrayList;

import android.graphics.drawable.Drawable;

import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.OverlayItem;

public class MyLocationDrawable extends ItemizedOverlay<OverlayItem> {

	private ArrayList<OverlayItem> overlayItems = null;
	
	public MyLocationDrawable(Drawable defaultMarker) {
		super(boundCenterBottom(defaultMarker));
		this.overlayItems = new ArrayList<OverlayItem>();
		// TODO Auto-generated constructor stub
	}
	
	public void updateOverlay(OverlayItem overlayItem){
		this.overlayItems.clear();
		this.overlayItems.add(overlayItem);
		populate();
	}

	@Override
	protected OverlayItem createItem(int i) {
		// TODO Auto-generated method stub
		return this.overlayItems.get(i);
	}

	@Override
	public int size() {
		// TODO Auto-generated method stub
		return this.overlayItems.size();
	}

}
